a11y: Notify of changes in the children list
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 15 Oct 2020 13:50:01 +0000 (14:50 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 21 Oct 2020 13:04:49 +0000 (14:04 +0100)
gtk/gtkwidget.c

index 49a16937cb94fa88904ddd13811c2868a106ba05..5d22f42248635e901f3e2f01d627e6854794d771 100644 (file)
@@ -2404,6 +2404,10 @@ gtk_widget_unparent (GtkWidget *widget)
 
   g_object_freeze_notify (G_OBJECT (widget));
 
+  gtk_accessible_update_children (GTK_ACCESSIBLE (priv->parent),
+                                  GTK_ACCESSIBLE (widget),
+                                  GTK_ACCESSIBLE_CHILD_STATE_REMOVED);
+
   root = _gtk_widget_get_root (widget);
   if (GTK_IS_WINDOW (root))
     _gtk_window_unset_focus_and_default (GTK_WINDOW (root), widget);
@@ -5790,6 +5794,10 @@ gtk_widget_reposition_after (GtkWidget *widget,
       gtk_widget_queue_compute_expand (parent);
     }
 
+  gtk_accessible_update_children (GTK_ACCESSIBLE (parent),
+                                  GTK_ACCESSIBLE (widget),
+                                  GTK_ACCESSIBLE_CHILD_STATE_ADDED);
+
   gtk_widget_pop_verify_invariants (widget);
 }